package liumengbaio.lolzhangyoubao.Activity.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

import liumengbaio.lolzhangyoubao.R;

/**
 * Created by lanouhn on 16/9/9.
 */
public class FavActivity extends AppCompatActivity implements View.OnClickListener {
    private RelativeLayout  btn_fav_areticle, btn_fav_heros, btn_fav_friends, btn_fav_real_show, btn_fav_match;
    private Button head_left_title;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.fav_activity);
        initView();
        initData();
    }

    private void initData() {
        head_left_title.setOnClickListener(this);
        btn_fav_areticle.setOnClickListener(this);
        btn_fav_heros.setOnClickListener(this);
        btn_fav_friends.setOnClickListener(this);
        btn_fav_real_show.setOnClickListener(this);
        btn_fav_match.setOnClickListener(this);
    }

    private void initView() {
        head_left_title = (Button) findViewById(R.id.head_left_title);
        btn_fav_areticle = (RelativeLayout) findViewById(R.id.btn_fav_areticle);
        btn_fav_heros = (RelativeLayout) findViewById(R.id.btn_fav_heros);
        btn_fav_friends = (RelativeLayout) findViewById(R.id.btn_fav_friends);
        btn_fav_real_show = (RelativeLayout) findViewById(R.id.btn_fav_real_show);
        btn_fav_match = (RelativeLayout) findViewById(R.id.btn_fav_match);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.head_left_title:
                finish();
                break;
            case R.id.btn_fav_areticle:
                Intent inten_areticle=new Intent(FavActivity.this,AreticleActivity.class);
                startActivity(inten_areticle);
                break;
            case R.id.btn_fav_heros:
                Intent inten_heros=new Intent(FavActivity.this,FavHerosActivity.class);
                startActivity(inten_heros);
                break;
            case R.id.btn_fav_friends:
                Intent inten_friends=new Intent(FavActivity.this,FriendsActivity.class);
                startActivity(inten_friends);
                break;
            case R.id.btn_fav_real_show:
                Intent inten_real_show=new Intent(FavActivity.this,FavRealShowActivity.class);
                startActivity(inten_real_show);
                break;
            case R.id.btn_fav_match:
                Intent inten_match=new Intent(FavActivity.this,MatchActivity.class);
                startActivity(inten_match);
                break;
        }
    }
}
